<extend name="Public:base"/>

<block name="main">

<div id="yzh-content" class="col-xs-12">
    <div class="main-title">
        <h2>数据库管理</h2>
    </div>

    <div class="table-actions">
        <a href="{:U('Database/index')}" class="btn btn-sm btn-primary">数据库管理</a>
        <a href="{:U('Database/recover')}" class="btn btn-sm btn-primary">备份管理</a>
        <input type="button" class="btn btn-sm btn-primary"  value="立即备份" onclick="myform.action='{:U('Database/backup')}';$('#myform').submit();">
    </div>

        <div class="alert alert-info" >
        备份数据包含新闻、产品等资料信息，您可以选择”立即备份“可备份当前网站的资料，您也可以在”备份管理“中选择下载备份数据或者是还原数据
        </div>

    <div class="env-class">
        <form id="myform" name="myform" method="post" action="">
            <table class="table table-hover table-bordered table-condensed">
                <thead>
                    <tr>
                        <th style="width:4%">选择</th>
                        <th align="left" style="width:20%">名称</th>
                        <th align="left" style="width:15%">类型</th>
                        <th align="left" style="width:15%">字符集</th>
                        <th align="left" style="width:8%">记录数</th>
                        <th align="left" style="width:8%">碎片</th>
                        <th align="left" style="width:8%">大小</th>
                    </tr>
                </thead>
                    <tbody>
                        <volist name="dataList" id="vo">
                        <tr>
                        <td align="center"><input type="checkbox" name="tables[]" value="{$vo.Name}" id="{$vo.Name}"> </td>
                            <td>{$vo.Name}</td>
                            <td>{$vo.Engine}</td>
                            <td>{$vo.Collation}</td>
                            <td>{$vo.Rows}</td>
                            <td>{$vo.Data_free|byte_format}</td>
                         <td>{$vo.Data_length|byte_format}</td>
                        </tr>
                        </volist>
                    </tbody>
                </table>

            <div class="row">
                <input type="checkbox" id="check_box" onclick="selectall('tables[]');">全选&nbsp;&nbsp;

                <span style="float:right;color:#FB0000">数据库大小：{$totalSize|byte_format}</span>
            </div>
        </form>
    </div>
</div>
</block>